<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>美嘉饲料</title>
<link href="<%=basePath%>skin/css/public.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath%>skin/css/school.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=basePath%>skin/css/bootstrap.css" >
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/sdmenu.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/select-widget-min.js"></script>	
<script type="text/javascript" src="<%=basePath%>skin/js/public.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/bootstrap/bootstrap-paginator.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	navi()
});
$().ready(function(){
	var currentPage = "${pagination.currentPage}";
	var totalPages = "${pagination.pageCount}";
	var numberOfPages = "${pagination.pageSize}";
	var keyword = encodeURI("${paramBean.keyword }");
	var productCategoryId = "${productCategoryId}";
    var options = {
		currentPage: currentPage,
		totalPages: totalPages,
		numberOfPages: numberOfPages,
		pageUrl:function(type, page, current){
			return basePath+"collegeTopic/list.shtml?keyword="+keyword+"&p="+page+"&productCategoryId="+productCategoryId;
		}
	}
	
    try {
    	$("#paginator").bootstrapPaginator(options);
    } catch (e) {}
});
</script>
</head>

<body>
	<div class="userCenter">
    	<div class="container">
    		<div class="header-wrap">
            	<c:import url="/layouts/top.jsp" />
                <c:import url="/layouts/head.jsp" />
                <div class="nav-warp">
					<div class="nav-main-warp wp">
						<div class="head-v3">
							<div class="navigation-up">
								<div class="navigation-inner">
									<div class="navigation-v3">
										<ul>
											<li class="fLeft navi_product first" _t_nav="product">
												<h2>
													<a href="<%=basePath%>shop/product/list.shtml">全部产品
														<img src="<%=basePath%>skin/images/all-product-arrow.png" />
													</a>
												</h2>
											</li>
											<li class="nav-up-selected-inpage fLeft" _t_nav="home">
												<h2>
													<a href="<%=basePath%>">美嘉商城</a>
												</h2>
											</li>
											<li class="fLeft self_community" _t_nav="community">
												<h2>
													<a href="javascript:void(0)">美嘉社区</a>
												</h2>
											</li>
											<li class="fLeft technology" _t_nav="technology">
												<h2>
													<a href="#">饲养技术</a>
												</h2>
											</li>
											<li class="fLeft server" _t_nav="server">
												<h2>
													<a href="">美嘉服务</a>
												</h2>
											</li>
											<li class="fLeft know" _t_nav="know">
												<h2>
													<a href="aboutMJ.html">了解美嘉</a>
												</h2>
											</li>
											<li class="fLeft navi_cart" _t_nav="cart">
												<h2>
													<a href="<%=basePath%>cart/list.shtml">
														<img src="<%=basePath%>skin/images/cart-icon.png" />购物车（<span id="cartnum">0</span>）
													</a>
												</h2>
											</li>
										</ul>
									</div>
								</div>
							</div>
							<div class="navigation-down">
								<div id="product" class="nav-down-menu menu-1"
									style="display: none;" _t_nav="product">
									<div class="navigation-down-inner">
										<c:forEach items="${productCategoryTree }" var="productCategory">
											<c:if test="${productCategory.grade == 0 }">
												<div class="navi-down-area">
													<a href="<%=basePath%>shop/product/list.shtml?productCategoryId=${productCategory.id }" class="product-cate">
														<img src="<%=basePath%>download.shtml?filepath=${productCategory.source}" />
													</a>
													<ul>
														<li><a href="<%=basePath%>shop/product/list.shtml?productCategoryId=${productCategory.id }">${productCategory.name}</a></li>
														<div class="clear"></div>
													</ul>
												</div>
											</c:if>
										</c:forEach>
									</div>
								</div>
								
								<div id="community" class="nav-down-menu menu-3" style="display: none;" _t_nav="community">
                                    <div class="navigation-down-inner">
                                    	<div class="navi-down-area-second">
                                        	<a href="<%=basePath%>forumTopic/list.shtml" class="product-cate"><img src="<%=basePath%>skin/images/mjbbs.png" /></a>
                                        </div>
                                        <div class="navi-down-area-second">
                                        	<a href="<%=basePath%>collegeTopic/list.shtml" class="product-cate"><img src="<%=basePath%>skin/images/mjschool.png" /></a>
                                        </div>
                                    </div>
                                </div>
							</div>
						</div>
					</div>
				</div>
            </div>
        	<div class="content-wrap">
            	<div class="link_navi wp"><a href="<%=basePath%>">主页</a> > <a href="<%=basePath%>collegeTopic/list.shtml">美嘉学院</a></div>
                <div class="content clearfix">
                    <div class="all">
                        <div class="listTitle">
                            <h1 class="title-l">美嘉学院</h1>
                        </div>
                        <br>
                        <div class="left box">
                            <ul class="news">
                            	<c:forEach items="${ pagination.recordList}" var="collegeTopic">
                                <li>
                                    <h2>
                                        <a target="_blank" href="<%=basePath%>collegeTopic/view.shtml?id=${collegeTopic.id}">${collegeTopic.title}</a>
                                    </h2>
                                    <a href="<%=basePath%>collegeTopic/list.shtml?productCategoryId=${collegeTopic.productCategory.id}">${collegeTopic.productCategory.name}</a>
                                    <fmt:formatDate value="${collegeTopic.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                    <c:if test="${not empty collegeTopic.source }">
                                    	<a target="_blank" href="<%=basePath%>collegeTopic/view.shtml?id=${collegeTopic.id}">
										<img src="<%=basePath%>download.shtml?filepath=${collegeTopic.source}" width="620px" height="310px"/>
										</a>
									</c:if>
                                    
                                    <p>
                                    	${collegeTopic.introduction}
                                        <a target="_blank" href="<%=basePath%>collegeTopic/view.shtml?id=${collegeTopic.id}">全文》</a>
                                    </p>
                                </li>
                                </c:forEach>
                            </ul>
                            <div class="pages" id="paginator">
                            </div>
                        </div>
                        <div class="right">
                            <div class="rom box">
                                <h4>
                                    <strong>新手必看</strong>
                                </h4>
                                <div class="info" style="text-align: left;margin-top: 10px;font-size: 14px;">
                                    <span style="color:#ff4800">饲料介绍：</span>
                                    <a href="#">饲料介绍</a>
                                     | 
                                     <a href="#">饲料介绍</a>
                                </div>
                            </div>
                            <br>
                            <div class="activities box">
                                <h4>
                                    <strong>热门产品</strong>
                                    <a class="r" href="<%=basePath%>shop/product/list.shtml"> 更多 ></a>
                                </h4>
                                <c:forEach items="${indexImages }" var="hotImage">
									<c:if test="${hotImage.type == 4 && not empty hotImage.source}">
                                        <dl>
		                                    <dt>
		                                        <a target="_blank"  href="${hotImage.url}">
		                                        <img src="<%=basePath%>download.shtml?filepath=${hotImage.source}" style="width: 125px; height:110px;" title="${hotImage.title}"/>
		                                        	${hotImage.title}
		                                        </a>
		                                    </dt>
                                		</dl>
									</c:if>
								</c:forEach>
                            </div>
                        </div>
                    </div>
                </div>
			</div>
			<c:import url="/layouts/foot.jsp" />
        </div>
    </div>
</body>
</html>
